package com.engineering.elink.videodao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.engineering.elink.co.BaseCo;
import com.engineering.elink.co.VideoCommentCo;
import com.engineering.elink.domain.VideoComment;
import com.engineering.elink.vo.CommentVo;

public interface VideoCommentMapper {
    int deleteByPrimaryKey(Integer commentId);

    int insert(VideoComment record);

    int insertSelective(VideoComment record);

    VideoComment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(VideoComment record);

    int updateByPrimaryKey(VideoComment record);

    int selectCountComment(@Param("videoId") Integer videoId,@Param("userId") String userId);

	List<CommentVo> selectTopCommentsByVideoId(@Param("co") VideoCommentCo co);

	int selectTopCommentsCount(@Param("co") VideoCommentCo co);

	List<CommentVo> selectAllCommentsByTopId(@Param("co") BaseCo co,@Param("topId")Integer topId,@Param("parentFlag") Boolean parentFlag);

	int selectCount(@Param("topId") int topId,@Param("parentFlag") Boolean parentFlag);
	
	int selectTopByRootId(Integer rootId);

	List<VideoComment> selectAllCommentByRootId(Integer rootId);
	
}